<template>
  <div id>
      
    <van-swipe class="my-swipe" :autoplay="3000">
      <van-swipe-item v-for="item in obj.images" :key="item.id" @click="big">
        <img :src="item" alt />
      </van-swipe-item>
    </van-swipe>
    <h3>{{obj.name}}</h3>
    <p>{{obj.phone}}</p>
    <p>{{obj.address}}</p>
  </div>
</template>

<script>
import { ImagePreview } from 'vant';

export default {
  name: "",
  data() {
    return {
      obj: {},

    };
  },
  mounted() {
    // console.log(this.$route.query.id);
    this.$axios({
      url: `https://locally.uieee.com/shops/${this.$route.query.id}`,
    }).then((res) => {
    //   this.$set(this.obj,"data",res.data);
   this.obj = res.data
   console.log(this.obj);
    });
  },
  created() {},
  methods: {
      big(){
          ImagePreview(this.obj.images);
      }
  },
};
</script>

<style scoped lang='scss'>
img {
  width: 100%;
  height: 100%;
}
</style>